package cn.labbook.bluetooth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: zhangyang
 * @Date: 2023/4/13 14:10
 * @Desc: 申请支付
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ApplyPay implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "tenant_pay_id", type = IdType.INPUT)
    private String tenantPayId;

    /**
     * 申请用户openId
     */
    private String openId;
    /**
     * 电表id
     */
    private String ammeterId;
    /**
     * 电表地址
     */
    private String location;

    /**
     * 申请金额
     */
    private Double amount;
    /**
     * 冲入电表金额
     */
    private Double payTrueAmount;
    /**
     * 主站平台手续费
     */
    private Double zkisPlatformAmount;
    /**
     * 保电金额
     */
    private Double protectPrice;

    /**
     * 申请时间
     */
    private Date createTime;
    /**
     * 支付成功时间
     */
    private Date payTime;

    /**
     * 状态
     */
    private Integer status;
    /**
     * 是否向房客收取服务费
     */
    private Integer isSkimp;
    /**
     * 转账失败原因
     */
    private String failReason;

    /**
     * 申请记录id
     */
    private Integer applyRecordId;


    public enum Status {

        WAIT_PAY(1, "待支付"),
        SUCCESS(2, "支付成功")

        ;
        private final int key;
        private final String value;

        Status(int key, String value) {
            this.key = key;
            this.value = value;
        }

        public int getKey() {
            return key;
        }

        public String getValue() {
            return value;
        }
    }

}
